package com.wwwarehouse.financialcenter.bean.bill;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by Jackie on 2017/11/24.
 * 订购商品请求结果实体
 */

public class BillOrderGoodsResponseBean implements Parcelable {

    /**
     * list : [{"img":"http://www.baidu.com.201709892.png","originPrice":12.6,"rsName":"小浣熊","rsQty":3,"rsUnit":"只"},{"img":"http: //www.baidu.com.201709892.png","originPrice":22.6,"rsName":"小灰狼","rsQty":2,"rsUnit":"只"}]
     * page : 1
     * size : 2
     * total : 2
     */

    private int page;
    private int size;
    private int total;
    private List<BillOrderGoodsDetailsBean> list;

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public List<BillOrderGoodsDetailsBean> getList() {
        return list;
    }

    public void setList(List<BillOrderGoodsDetailsBean> list) {
        this.list = list;
    }

    public static class BillOrderGoodsDetailsBean implements Parcelable {
        /**
         * img : http://www.baidu.com.201709892.png
         * originPrice : 12.6
         * rsName : 小浣熊
         * rsQty : 3
         * rsUnit : 只
         */

        private String img;
        private String originPrice;
        private String rsName;
        private String rsQty;
        private String rsUnit;

        public String getImg() {
            return img;
        }

        public void setImg(String img) {
            this.img = img;
        }

        public String getOriginPrice() {
            return originPrice;
        }

        public void setOriginPrice(String originPrice) {
            this.originPrice = originPrice;
        }

        public String getRsName() {
            return rsName;
        }

        public void setRsName(String rsName) {
            this.rsName = rsName;
        }

        public String getRsQty() {
            return rsQty;
        }

        public void setRsQty(String rsQty) {
            this.rsQty = rsQty;
        }

        public String getRsUnit() {
            return rsUnit;
        }

        public void setRsUnit(String rsUnit) {
            this.rsUnit = rsUnit;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.img);
            dest.writeString(this.originPrice);
            dest.writeString(this.rsName);
            dest.writeString(this.rsQty);
            dest.writeString(this.rsUnit);
        }

        public BillOrderGoodsDetailsBean() {
        }

        protected BillOrderGoodsDetailsBean(Parcel in) {
            this.img = in.readString();
            this.originPrice = in.readString();
            this.rsName = in.readString();
            this.rsQty = in.readString();
            this.rsUnit = in.readString();
        }

        public static final Parcelable.Creator<BillOrderGoodsDetailsBean> CREATOR = new Parcelable.Creator<BillOrderGoodsDetailsBean>() {
            @Override
            public BillOrderGoodsDetailsBean createFromParcel(Parcel source) {
                return new BillOrderGoodsDetailsBean(source);
            }

            @Override
            public BillOrderGoodsDetailsBean[] newArray(int size) {
                return new BillOrderGoodsDetailsBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.page);
        dest.writeInt(this.size);
        dest.writeInt(this.total);
        dest.writeTypedList(this.list);
    }

    public BillOrderGoodsResponseBean() {
    }

    protected BillOrderGoodsResponseBean(Parcel in) {
        this.page = in.readInt();
        this.size = in.readInt();
        this.total = in.readInt();
        this.list = in.createTypedArrayList(BillOrderGoodsDetailsBean.CREATOR);
    }

    public static final Parcelable.Creator<BillOrderGoodsResponseBean> CREATOR = new Parcelable.Creator<BillOrderGoodsResponseBean>() {
        @Override
        public BillOrderGoodsResponseBean createFromParcel(Parcel source) {
            return new BillOrderGoodsResponseBean(source);
        }

        @Override
        public BillOrderGoodsResponseBean[] newArray(int size) {
            return new BillOrderGoodsResponseBean[size];
        }
    };
}
